﻿/**
 * Created by Administrator on 2015/9/27.
 */
//
var xlsx = require("node-xlsx");
var fs = require('fs');
var path= require("path");
//获取excel数据
exports.getXLSData = function(file)
{
	var list = xlsx.parse(file)[0]["data"];
	var names = list[0];
	var content = [];
	for(var idx=1;idx<list.length;idx++)
	{
		var line = {};
		for(var idx2=0;idx2<names.length;idx2++)
		{
			line[names[idx2]] = list[idx][idx2];
		}
		content.push(line);
	}
	return content;
};